//
//  CoreDataViewController.m
//  Camera
//
//  Created by gml on 2018/12/10.
//  Copyright © 2018年 gml. All rights reserved.
//

#import "CoreDataViewController.h"
#import "Person.h"

@interface CoreDataViewController ()

@end

@implementation CoreDataViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    Person *p1 = [[Person alloc] initWithValue:@{@"name":@"rose",@"age":@(10)}];
    Person *p2 = [[Person alloc] initWithValue:@{@"name":@"jack",@"age":@(15)}];
    RLMRealm *realm = [RLMRealm defaultRealm];
    [realm beginWriteTransaction];

    [realm addObject:p1];
    [realm addObject:p2];

    [realm commitWriteTransaction];

    RLMResults *results = [Person allObjects];
    NSLog(@"------%@",realm.configuration.fileURL.absoluteString);
    
    // 
    
}



@end
